Those NT writers (and editors/redactors) thought they were living at the very last of the Last Days, with the imminent divine intervention in prospect - in their own time, during "this generation". An example is at Revelation 22:7, 12, 20: "I am coming soon."
They were wrong. This idea of an imminent divine intervention has been repeated throughout history, yet people never learn the lesson that history teaches. So we see people today saying the same thing - all with a score of zero.
You are correct that at 1 Thessalonians, Paul expected the Coming to take place while "we who are still alive". When that failed to eventuate, someone - well after Paul's death - tried to calm down their heightened fervor and wrote 2 Thessalonians.
Doug